package windows;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JSeparator;
import javax.swing.JTextArea;

public class ManageInsumosDelete extends JPanel implements ActionListener
{

	/**
	 *
	 */
	private static final long serialVersionUID = 1L;
	private JButton btnDelete;
	private JButton lblsearch;

	private JList  lstEditFields;

	private JLabel lblNameInsumo;
	private JLabel lblCodInsumo;
	private JLabel lblListInsumos;


	private JTextArea AreaNameInsumo;
	private JTextArea AreaCodInsumo;

	private JSeparator Separator;




	public ManageInsumosDelete()
	{
		// TODO Auto-generated constructor stub

		setLayout(null);



		/***************************JButton**************************************/
		btnDelete = new JButton("Eliminar");
		btnDelete.setBounds(170,400, 100, 20);
		btnDelete.addActionListener(this);
		btnDelete.setVisible(false);
		add(btnDelete);

		lblsearch= new JButton("Buscar");
		lblsearch.setBounds(200,220, 80, 20);
		lblsearch.addActionListener(this);
		add(lblsearch);

	    /******************************JLabel**********************************/

		lblCodInsumo=new JLabel("Codigo:");
		lblCodInsumo.setBounds(50, 15, 150, 25);
		add(lblCodInsumo);

		lblNameInsumo = new JLabel("Nombre Lista:");
		lblNameInsumo.setBounds(50, 50, 150, 25);
		add(lblNameInsumo);

		lblListInsumos = new JLabel("Lista de Insumos:");
		lblListInsumos.setBounds(60, 140, 150, 25);
		add(lblListInsumos);
		
		

		/****************************JTextArea*************************************/
		AreaNameInsumo = new JTextArea();
		AreaNameInsumo.setBounds(180, 50, 150, 20);
		AreaNameInsumo.setEditable(false);
		add(AreaNameInsumo);

		AreaCodInsumo = new JTextArea();
		AreaCodInsumo.setBounds(180, 15, 150, 20);
		add(AreaCodInsumo);


		/****************************** JList *************************/
		 lstEditFields = new JList();
		 lstEditFields.setBounds(180, 120, 150, 60);
		 add( lstEditFields);

		 /****************************************/

		Separator =new JSeparator();
		Separator.setBounds(50, 100, 360,5 );
		add(Separator);


		Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
		setBounds((screenSize.width-664)/2, (screenSize.height-456)/2, 670, 310);
	}



	public void actionPerformed(ActionEvent e)
	{

		if(e.getSource()==btnDelete)
		{

		}
		if(e.getSource()==lblsearch)
		{
			btnDelete.setVisible(true);
		}

	}

}
